package com.client;

import java.util.Set;

import org.junit.Test;

import com.domain.CircularQueue;
import com.domain.CircularQueueV2;
import com.domain.Task;


/**
 * 描述 
 * 时间 2017-10-23 20:32
 * 作者 肖亦鸣
 */
public class ClientTest {
	@Test
	public void testCircularQueueV2(){
		CircularQueueV2 queue = new CircularQueueV2();
		Task task = new Task();
		task.setIndex(0);
		System.out.println(queue.isEmpty());
		queue.enQueueV2(task);
		System.out.println(queue);
		Set set = queue.queueFrontV2();
		System.out.println(set);
		
		System.out.println(queue.isEmpty());
		queue.outQueue();
		
		System.out.println(queue.isEmpty());
	}
	@Test
	public void testCircularQueue(){
		CircularQueue<Task> queue = new CircularQueue<Task>();
		Task task = new Task();
		System.out.println(queue.isEmpty());
		task.setIndex(55);
		queue.enQueue(task);
		System.out.println(queue);
		
		
		Task task1 = queue.queueFront();
		System.out.println(task1);
		
		System.out.println(queue.isEmpty());
		queue.outQueue();
		
		System.out.println(queue.isEmpty());
	}
}
